package org.learn.test;

public class ForExercise {
    public static void main(String[] args) {
        //打印1~100之间的所有9的倍数的整数和求和，统计个数
        int count = 0;
        int sum = 0;
        int start = 1;
        int end = 100;
        int t = 9;
       for(int n1 = start; n1 <= end; n1++) {
           if(n1 % t == 0){
               System.out.println("n1=" + n1);
               count += 1;
               sum += sum;
           }
       }
        System.out.println("count=" + count);
        System.out.println("sum=" + sum);


    }
}
